package com.sinocare.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * scc_user_login(用户信息表)实体类
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("scc_user_login")//当前实现类与数据库哪张表封装
public class UserLogin implements Serializable {
    private static final long serialVersionUID = 2649599380253576554L;

    @TableId(value = "id",type = IdType.AUTO)//标识列
    private Integer id;               //用户表ID
    private String phone;               //手机号
    private String password;               //密码
    private String name;               //姓名
    private String customerCode;               //客户编码
    private Integer isAdmin;               //是否是管理员

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @TableField("create_time")//表示当前属性名对应的字段名
    private Date createTime;                                //创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @TableField("update_time")//表示当前属性名对应的字段名
    private Date updateTime;                                //修改时间

    private boolean status;               //状态(0禁用1正常，默认1)

}
